package com.sali.rule;

import cn.hutool.core.lang.Assert;


public class FieldNameToLowerCaseRule implements Rule {
    private static Rule rule;

    static {
        rule = new FieldNameToLowerCaseRule();
    }

    @Override
    public Object invoke(Object value) {
        Assert.notNull(value);
        return String.valueOf(value).toLowerCase();
    }

    /**
     * 获取实例方法
     *
     * @return
     */
    public static Rule getInstance() {
        return rule;
    }

    public static void main(String[] args) {
        Object aa = FieldNameToLowerCaseRule.getInstance().invoke(123);
        System.out.println(aa);
    }
}
